<?php
/**
 * Created by PhpStorm.
 * User: luojinyi
 * Date: 2018/3/10
 * Time: 上午10:33
 */

namespace App\Http\Requests;

use Dingo\Api\Routing\Helpers;
use Illuminate\Support\Facades\Auth;
use Dingo\Api\Http\FormRequest;

/**
 * 基类角色和权限判断
 * Class ApiRequest
 * @package App\Http\Requests
 */
class ApiRequest extends FormRequest
{
//    use Helpers;

    protected function checkPermission($permission){

//        try{
//
//            //具有super-admin超级管理员角色
//            if (Auth::user()->hasRole('super-admin')) {
                return true;
//            }
//
//            return Auth::user()->hasPermissionTo($permission);
//
//        }catch (\Exception $exception){
//            return $exception->getMessage();
//        }
    }
}
